/*
 * CompareMetric.h
 *
 *  Created on: 13-09-2013
 *      Author: Krzychu
 */

#ifndef COMPAREMETRIC_H_
#define COMPAREMETRIC_H_

#include <iostream>
#include <string>
#include <map>
#include <vector>

using namespace std;

class CompareMetric
{
public:
	CompareMetric();
	virtual ~CompareMetric();
	void addWord(const string word);
	void sortWordCounts();

	int getWordCount(string word);
	map<string, int> getWordsCount();
	void generateNWords(int maxFragment);
	map<int, vector<string> > getNWords();
	vector<string> getWords();
protected:
	map<int, vector<string> > nWords;
private:
	map<string, int> wordsCount;
	vector<string> words;
	long documentLength;
	int documentWordsCount;
	vector<int> desiredCharacterCodes;

	void clean(string& word);
};

#endif /* COMPAREMETRIC_H_ */
